package everyday;

import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @Author: Siantar
 * @Date: 2024-07-26-14:02
 * @Description: 1.0
 */
public class T2714 {
    public int findValueOfPartition(int[] nums) {
        Arrays.sort(nums);
        int res = Integer.MAX_VALUE, preNum = -1;
        for (int num : nums) {
            if (preNum==-1){
                preNum = num;
                continue;
            }
            res = Math.min(res, Math.abs(num - preNum));
            preNum = num;
        }
        return res;
    }
}
